using System;
using System.Collections.Generic;

namespace Joy.Erp.Ufida.Pmc
{
    /// <summary>
    /// 料品供需平衡分析DTO
    /// </summary>
    public class MaterialBalanceAnalysisDto
    {
        /// <summary>
        /// 料品ID
        /// </summary>
        public Guid ItemMasterId { get; set; }

        /// <summary>
        /// 料号
        /// </summary>
        public string ItemCode { get; set; }

        /// <summary>
        /// 料品名称
        /// </summary>
        public string ItemName { get; set; }

        /// <summary>
        /// 料品规格
        /// </summary>
        public string ItemSpec { get; set; }

        /// <summary>
        /// 计量单位
        /// </summary>
        public string Uom { get; set; }

        /// <summary>
        /// 期初现存量
        /// </summary>
        public decimal InitialStock { get; set; }

        /// <summary>
        /// 总需求数量
        /// </summary>
        public decimal TotalDemandQuantity { get; set; }

        /// <summary>
        /// 总供应数量
        /// </summary>
        public decimal TotalSupplyQuantity { get; set; }

        /// <summary>
        /// 期末预计结存量
        /// </summary>
        public decimal ProjectedEndingStock { get; set; }

        /// <summary>
        /// 安全库存
        /// </summary>
        public decimal? SafetyStock { get; set; }

        /// <summary>
        /// 最小订购量
        /// </summary>
        public decimal? MinOrderQuantity { get; set; }

        /// <summary>
        /// 期内现存量（截止日期时的结存）
        /// </summary>
        public decimal WithinPeriodStock { get; set; }

        /// <summary>
        /// 期内总供应
        /// </summary>
        public decimal WithinPeriodTotalSupply { get; set; }

        /// <summary>
        /// 期内总需求
        /// </summary>
        public decimal WithinPeriodTotalDemand { get; set; }

        /// <summary>
        /// 期外现存量
        /// </summary>
        public decimal OutOfPeriodStock { get; set; }

        /// <summary>
        /// 期外总供应
        /// </summary>
        public decimal OutOfPeriodTotalSupply { get; set; }

        /// <summary>
        /// 期外总需求
        /// </summary>
        public decimal OutOfPeriodTotalDemand { get; set; }

        /// <summary>
        /// 期内是否缺料
        /// </summary>
        public bool IsWithinPeriodShortage { get; set; }

        /// <summary>
        /// 期内最大缺料数量
        /// </summary>
        public decimal? WithinPeriodMaxShortageQuantity { get; set; }

        /// <summary>
        /// 期外是否缺料
        /// </summary>
        public bool IsOutOfPeriodShortage { get; set; }

        /// <summary>
        /// 期外最大缺料数量
        /// </summary>
        public decimal? OutOfPeriodMaxShortageQuantity { get; set; }

        /// <summary>
        /// 每日供需平衡明细列表
        /// </summary>
        public List<DailyBalanceDto> DailyBalances { get; set; }

        /// <summary>
        /// 供应和需求记录集合
        /// </summary>
        public List<SupplyDemandRecordDto> SupplyDemandRecords { get; set; }

        public MaterialBalanceAnalysisDto()
        {
            DailyBalances = new List<DailyBalanceDto>();
            SupplyDemandRecords = new List<SupplyDemandRecordDto>();
        }
    }
}

